package com.example.shop.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.TextView;

/**
 * Created by Administrator on 2016/3/15.
 */
public class CrossTextView extends TextView {
    Paint mPaint=new Paint();
    public CrossTextView(Context context) {
        super(context);
    }

    public CrossTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        canvas.drawLine(0,this.getHeight()/2,this.getWidth(),getHeight()/2,mPaint);
    }
}
